<html>
<head><meta charset="utf-8"><title>Remove `const_fn` feature gate · t-compiler/const-eval · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/index.html">t-compiler/const-eval</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Remove.20.60const_fn.60.20feature.20gate.html">Remove `const_fn` feature gate</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="186396679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Remove%20%60const_fn%60%20feature%20gate/near/186396679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Remove.20.60const_fn.60.20feature.20gate.html#186396679">(Jan 23 2020 at 15:01)</a>:</h4>
<blockquote>
<p>There's also the task of deprecating the current semantics for unadorned bounds in <code>const fn</code> and directing people to use <code>?const</code>. I had mentioned that it would be possible to have <code>#![feature(const_fn)]</code> preserve the existing semantics for trait bounds at the cost of slightly increased complexity in the const checker. I would have liked to have removed <code>qualify_min_const_fn</code> entirely by this point; it would have made the back-compat idea easier since <code>#![feature(const_fn)]</code> wouldn't serve double duty. Since that pass still exists, I think we should not try to do the back-compat thing.</p>
</blockquote>



<a name="186396702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Remove%20%60const_fn%60%20feature%20gate/near/186396702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Remove.20.60const_fn.60.20feature.20gate.html#186396702">(Jan 23 2020 at 15:01)</a>:</h4>
<p>Yea that's an annoying situation</p>



<a name="186396819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Remove%20%60const_fn%60%20feature%20gate/near/186396819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Remove.20.60const_fn.60.20feature.20gate.html#186396819">(Jan 23 2020 at 15:02)</a>:</h4>
<p>Could we do an intermediate step and keep <code>qualify_min_const_fn</code> but just run it on <em>all</em> const fn now</p>



<a name="186397005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Remove%20%60const_fn%60%20feature%20gate/near/186397005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Remove.20.60const_fn.60.20feature.20gate.html#186397005">(Jan 23 2020 at 15:04)</a>:</h4>
<p>Then you could make the <code>if feature_gate(const_trait_bound_opt_out)</code> check be <code>if feature_gate(const_trait_bound_opt_out) || feature_gate(const_fn)</code> and remove all other uses of the <code>const fn</code> feature gate in rustc</p>



<a name="186397108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Remove%20%60const_fn%60%20feature%20gate/near/186397108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Remove.20.60const_fn.60.20feature.20gate.html#186397108">(Jan 23 2020 at 15:05)</a>:</h4>
<p>I don't remember if we got rid of the <code>const_fn</code> check in <code>constness.rs</code> yet</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>